import request from '@/utils/request'

// 查询变更履历列表
export function listTrace(query) {
  return request({
    url: '/goods/good/tracelist',
    method: 'get',
    params: query
  })
}

// 查询变更履历详细
export function getTrace(goodsId) {
  return request({
    url: '/goods/good/' + goodsId,
    method: 'get'
  })
}

// 新增变更履历
export function addTrace(data) {
  return request({
    url: '/goods/good',
    method: 'post',
    data: data
  })
}

// 修改变更履历
export function updateTrace(data) {
  return request({
    url: '/goods/good',
    method: 'put',
    data: data
  })
}

// 删除变更履历
export function delTrace(goodsId) {
  return request({
    url: '/goods/good/' + goodsId,
    method: 'delete'
  })
}
